{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "toc_visible": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# **Elliptic++ Actors (Wallet Addresses) Dataset**\n",
        "\n",
        "***Note: \"Actor\" refers to a Bitcoin wallet address***\n",
        "\n",
        "---\n",
        "---\n",
        "\n",
        "\n",
        "Released by: Youssef Elmougy, Ling Liu\n",
        "\n",
        "\n",
        "\n",
        "School of Computer Science, Georgia Institute of Technology\n",
        "\n",
        "Contact: yelmougy3@gatech.edu\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "Github Repository: [https://www.github.com/git-disl/EllipticPlusPlus](https://www.github.com/git-disl/EllipticPlusPlus)\n",
        "\n",
        "\n",
        "If you use our dataset in your work, please cite our paper:\n",
        "\n",
        "\n",
        "\n",
        "\n",
        "\n",
        ">> Youssef Elmougy and Ling Liu. 2023. Demystifying Fraudulent Transactions and Illicit Nodes in the Bitcoin Network for Financial Forensics.\n",
        "\n",
        "---\n",
        "\n"
      ],
      "metadata": {
        "id": "O34u-DVsX4jx"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "## [SETUP] Import libraries and csv files "
      ],
      "metadata": {
        "id": "ReHrhaPiaiI-"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Download dataset from: [https://www.github.com/git-disl/EllipticPlusPlus](https://www.github.com/git-disl/EllipticPlusPlus)"
      ],
      "metadata": {
        "id": "TLi0Zc7j6Rb6"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "eUbJT_J-A1Mw",
        "outputId": "4020ff04-efa0-4b11-be41-a8507f0bf55e"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
          ]
        }
      ],
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/wallets_features.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/wallets_classes.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/AddrAddr_edgelist.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/AddrTx_edgelist.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/TxAddr_edgelist.csv ./\n",
        "!cp drive/My\\ Drive/Elliptic++\\ Dataset/wallets_features_classes_combined.csv ./"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "kz7WtWhG6MtI",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "076dbd94-a606-4648-b1c7-c1839a9b5e79"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
            "Requirement already satisfied: ipython in /usr/local/lib/python3.8/dist-packages (8.9.0)\n",
            "Requirement already satisfied: pickleshare in /usr/local/lib/python3.8/dist-packages (from ipython) (0.7.5)\n",
            "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.30 in /usr/local/lib/python3.8/dist-packages (from ipython) (3.0.36)\n",
            "Requirement already satisfied: traitlets>=5 in /usr/local/lib/python3.8/dist-packages (from ipython) (5.7.1)\n",
            "Requirement already satisfied: backcall in /usr/local/lib/python3.8/dist-packages (from ipython) (0.2.0)\n",
            "Requirement already satisfied: pygments>=2.4.0 in /usr/local/lib/python3.8/dist-packages (from ipython) (2.6.1)\n",
            "Requirement already satisfied: stack-data in /usr/local/lib/python3.8/dist-packages (from ipython) (0.6.2)\n",
            "Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.8/dist-packages (from ipython) (4.8.0)\n",
            "Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.8/dist-packages (from ipython) (0.18.2)\n",
            "Requirement already satisfied: decorator in /usr/local/lib/python3.8/dist-packages (from ipython) (4.4.2)\n",
            "Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.8/dist-packages (from ipython) (0.1.6)\n",
            "Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.8/dist-packages (from jedi>=0.16->ipython) (0.8.3)\n",
            "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.8/dist-packages (from pexpect>4.3->ipython) (0.7.0)\n",
            "Requirement already satisfied: wcwidth in /usr/local/lib/python3.8/dist-packages (from prompt-toolkit<3.1.0,>=3.0.30->ipython) (0.2.5)\n",
            "Requirement already satisfied: asttokens>=2.1.0 in /usr/local/lib/python3.8/dist-packages (from stack-data->ipython) (2.2.1)\n",
            "Requirement already satisfied: pure-eval in /usr/local/lib/python3.8/dist-packages (from stack-data->ipython) (0.2.2)\n",
            "Requirement already satisfied: executing>=1.2.0 in /usr/local/lib/python3.8/dist-packages (from stack-data->ipython) (1.2.0)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from asttokens>=2.1.0->stack-data->ipython) (1.15.0)\n"
          ]
        }
      ],
      "source": [
        "import numpy as np\n",
        "import pandas as pd\n",
        "import matplotlib.pyplot as plt\n",
        "import seaborn as sns\n",
        "import networkx as nx\n",
        "import plotly.graph_objs as go \n",
        "import plotly.offline as py \n",
        "import math\n",
        "from collections import Counter\n",
        "\n",
        "!pip install -U ipython \n",
        "from IPython.core.interactiveshell import InteractiveShell\n",
        "InteractiveShell.ast_node_interactivity = 'all'"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.model_selection import train_test_split\n",
        "from sklearn.ensemble import RandomForestClassifier\n",
        "from sklearn.metrics import precision_recall_fscore_support\n",
        "from sklearn.model_selection import train_test_split\n",
        "from sklearn.linear_model import LogisticRegression\n",
        "from sklearn.neural_network import MLPClassifier\n",
        "from sklearn.metrics import f1_score, accuracy_score, confusion_matrix\n",
        "from sklearn.cluster import KMeans\n",
        "from sklearn.model_selection import GridSearchCV\n",
        "from sklearn.preprocessing import MinMaxScaler\n",
        "from sklearn.ensemble import VotingClassifier\n",
        "from sklearn.base import clone \n",
        "\n",
        "import xgboost as xgb"
      ],
      "metadata": {
        "id": "TKJFAkVLp34j"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install eli5\n",
        "import eli5\n",
        "from eli5.sklearn import PermutationImportance"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "bRW1hh3S4pbS",
        "outputId": "5eb48ea7-b0dd-4804-aaf3-6e438b3eef65"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
            "Collecting eli5\n",
            "  Downloading eli5-0.13.0.tar.gz (216 kB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m216.2/216.2 KB\u001b[0m \u001b[31m8.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "Requirement already satisfied: attrs>17.1.0 in /usr/local/lib/python3.8/dist-packages (from eli5) (22.2.0)\n",
            "Collecting jinja2>=3.0.0\n",
            "  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m133.1/133.1 KB\u001b[0m \u001b[31m17.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hRequirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.8/dist-packages (from eli5) (1.21.6)\n",
            "Requirement already satisfied: scipy in /usr/local/lib/python3.8/dist-packages (from eli5) (1.7.3)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from eli5) (1.15.0)\n",
            "Requirement already satisfied: scikit-learn>=0.20 in /usr/local/lib/python3.8/dist-packages (from eli5) (1.0.2)\n",
            "Requirement already satisfied: graphviz in /usr/local/lib/python3.8/dist-packages (from eli5) (0.10.1)\n",
            "Requirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.8/dist-packages (from eli5) (0.8.10)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.8/dist-packages (from jinja2>=3.0.0->eli5) (2.0.1)\n",
            "Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.20->eli5) (1.2.0)\n",
            "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.20->eli5) (3.1.0)\n",
            "Building wheels for collected packages: eli5\n",
            "  Building wheel for eli5 (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "  Created wheel for eli5: filename=eli5-0.13.0-py2.py3-none-any.whl size=107748 sha256=4ad64e3b8b283172c1ae01f750cdea27fcc42eeef533a5a0428c77fa474f08d2\n",
            "  Stored in directory: /root/.cache/pip/wheels/85/ac/25/ffcd87ef8f9b1eec324fdf339359be71f22612459d8c75d89c\n",
            "Successfully built eli5\n",
            "Installing collected packages: jinja2, eli5\n",
            "  Attempting uninstall: jinja2\n",
            "    Found existing installation: Jinja2 2.11.3\n",
            "    Uninstalling Jinja2-2.11.3:\n",
            "      Successfully uninstalled Jinja2-2.11.3\n",
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "notebook 5.7.16 requires jinja2<=3.0.0, but you have jinja2 3.1.2 which is incompatible.\n",
            "google-colab 1.0.0 requires ipython~=7.9.0, but you have ipython 8.9.0 which is incompatible.\n",
            "flask 1.1.4 requires Jinja2<3.0,>=2.10.1, but you have jinja2 3.1.2 which is incompatible.\u001b[0m\u001b[31m\n",
            "\u001b[0mSuccessfully installed eli5-0.13.0 jinja2-3.1.2\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Actors Dataset Overview\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "This section loads the 5 csv files (wallets_features, wallets_classes, AddrAddr_edgelist, AddrTx_edgelist, TxAddr_edgelist) and provides a quick overview of the dataset structure and features."
      ],
      "metadata": {
        "id": "y3JLmL3SfJqP"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Load saved actors dataset csv files:"
      ],
      "metadata": {
        "id": "ZcdjXmV8gr8S"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(\"\\nActors features: \\n\")\n",
        "df_wallets_features = pd.read_csv(\"wallets_features.csv\")\n",
        "df_wallets_features\n",
        "\n",
        "print(\"\\nActors Classes: \\n\")\n",
        "df_wallets_classes = pd.read_csv(\"wallets_classes.csv\")\n",
        "df_wallets_classes\n",
        "\n",
        "print(\"\\nAddress-Address edgelist: \\n\") #Actor Interaction graph edgelist\n",
        "df_AddrAddr_edgelist = pd.read_csv(\"AddrAddr_edgelist.csv\")\n",
        "df_AddrAddr_edgelist\n",
        "\n",
        "print(\"\\nAddress-Transaction edgelist: \\n\") #Address-Transaction graph edgelist\n",
        "df_AddrTx_edgelist = pd.read_csv(\"AddrTx_edgelist.csv\")\n",
        "df_AddrTx_edgelist\n",
        "\n",
        "print(\"\\nTransaction-Address edgelist: \\n\") #Address-Transaction graph edgelist\n",
        "df_TxAddr_edgelist = pd.read_csv(\"TxAddr_edgelist.csv\")\n",
        "df_TxAddr_edgelist\n",
        "\n",
        "# combined features and classes csv files for convenience\n",
        "df_wallets_features_classes_combined = pd.read_csv(\"wallets_features_classes_combined.csv\")"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "dNNEwGmae2Eo",
        "outputId": "fe1af67e-d31b-49bf-e19b-7f93dd6fdb98"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Actors features: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  Time step  num_txs_as_sender  \\\n",
              "0         111112TykSw72ztDN2WJger4cynzWYC5w         25                0.0   \n",
              "1         1111DAYXhoxZx2tsRnzimfozo783x1yC2         25                0.0   \n",
              "2         1111DAYXhoxZx2tsRnzimfozo783x1yC2         29                0.0   \n",
              "3         1111DAYXhoxZx2tsRnzimfozo783x1yC2         39                0.0   \n",
              "4         1111DAYXhoxZx2tsRnzimfozo783x1yC2         39                0.0   \n",
              "...                                     ...        ...                ...   \n",
              "1268255  3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq         31                1.0   \n",
              "1268256  3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf         44                0.0   \n",
              "1268257  3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid          9                0.0   \n",
              "1268258  3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6          3                0.0   \n",
              "1268259  3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW          9                1.0   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "0                        1.0                 439586.0                439586.0   \n",
              "1                        8.0                 439589.0                485959.0   \n",
              "2                        8.0                 439589.0                485959.0   \n",
              "3                        8.0                 439589.0                485959.0   \n",
              "4                        8.0                 439589.0                485959.0   \n",
              "...                      ...                      ...                     ...   \n",
              "1268255                  1.0                 451684.0                451685.0   \n",
              "1268256                  1.0                 477895.0                477895.0   \n",
              "1268257                  1.0                 407342.0                407342.0   \n",
              "1268258                  1.0                 395235.0                395235.0   \n",
              "1268259                  0.0                 407333.0                407333.0   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "0                       0.0        1.0               0.0   \n",
              "1                   46370.0        8.0               0.0   \n",
              "2                   46370.0        8.0               0.0   \n",
              "3                   46370.0        8.0               0.0   \n",
              "4                   46370.0        8.0               0.0   \n",
              "...                     ...        ...               ...   \n",
              "1268255                 1.0        2.0          451685.0   \n",
              "1268256                 0.0        1.0               0.0   \n",
              "1268257                 0.0        1.0               0.0   \n",
              "1268258                 0.0        1.0               0.0   \n",
              "1268259                 0.0        1.0          407333.0   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "0                    439586.0  ...                         0.0   \n",
              "1                    439589.0  ...                         0.0   \n",
              "2                    439589.0  ...                         0.0   \n",
              "3                    439589.0  ...                         0.0   \n",
              "4                    439589.0  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1268255              451684.0  ...                         0.0   \n",
              "1268256              477895.0  ...                         0.0   \n",
              "1268257              407342.0  ...                         0.0   \n",
              "1268258              395235.0  ...                         0.0   \n",
              "1268259                   0.0  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "0                               0.0                     0.000000   \n",
              "1                           20164.0                  6624.285714   \n",
              "2                           20164.0                  6624.285714   \n",
              "3                           20164.0                  6624.285714   \n",
              "4                           20164.0                  6624.285714   \n",
              "...                             ...                          ...   \n",
              "1268255                         0.0                     0.000000   \n",
              "1268256                         0.0                     0.000000   \n",
              "1268257                         0.0                     0.000000   \n",
              "1268258                         0.0                     0.000000   \n",
              "1268259                         0.0                     0.000000   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "0                                  0.0                           0.0   \n",
              "1                               8060.0                           0.0   \n",
              "2                               8060.0                           0.0   \n",
              "3                               8060.0                           0.0   \n",
              "4                               8060.0                           0.0   \n",
              "...                                ...                           ...   \n",
              "1268255                            0.0                           0.0   \n",
              "1268256                            0.0                           0.0   \n",
              "1268257                            0.0                           0.0   \n",
              "1268258                            0.0                           0.0   \n",
              "1268259                            0.0                           0.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "0                              24.0                       1.0   \n",
              "1                               8.0                       1.0   \n",
              "2                               8.0                       1.0   \n",
              "3                               8.0                       1.0   \n",
              "4                               8.0                       1.0   \n",
              "...                             ...                       ...   \n",
              "1268255                         3.0                       1.0   \n",
              "1268256                         1.0                       1.0   \n",
              "1268257                         1.0                       1.0   \n",
              "1268258                         1.0                       1.0   \n",
              "1268259                         1.0                       1.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "0                             1.0                        1.0   \n",
              "1                             1.0                        1.0   \n",
              "2                             1.0                        1.0   \n",
              "3                             1.0                        1.0   \n",
              "4                             1.0                        1.0   \n",
              "...                           ...                        ...   \n",
              "1268255                       1.0                        1.0   \n",
              "1268256                       1.0                        1.0   \n",
              "1268257                       1.0                        1.0   \n",
              "1268258                       1.0                        1.0   \n",
              "1268259                       1.0                        1.0   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "0                                1.0  \n",
              "1                                1.0  \n",
              "2                                1.0  \n",
              "3                                1.0  \n",
              "4                                1.0  \n",
              "...                              ...  \n",
              "1268255                          1.0  \n",
              "1268256                          1.0  \n",
              "1268257                          1.0  \n",
              "1268258                          1.0  \n",
              "1268259                          1.0  \n",
              "\n",
              "[1268260 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-9581ea60-d34a-4cc9-804b-29709baa47a1\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>Time step</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>25</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439586.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>24.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>25</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>29</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>39</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>39</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>485959.0</td>\n",
              "      <td>46370.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>439589.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>20164.0</td>\n",
              "      <td>6624.285714</td>\n",
              "      <td>8060.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>8.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268255</th>\n",
              "      <td>3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq</td>\n",
              "      <td>31</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>451684.0</td>\n",
              "      <td>451685.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>2.0</td>\n",
              "      <td>451685.0</td>\n",
              "      <td>451684.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268256</th>\n",
              "      <td>3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf</td>\n",
              "      <td>44</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>477895.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268257</th>\n",
              "      <td>3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid</td>\n",
              "      <td>9</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>407342.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268258</th>\n",
              "      <td>3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6</td>\n",
              "      <td>3</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>395235.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1268259</th>\n",
              "      <td>3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW</td>\n",
              "      <td>9</td>\n",
              "      <td>1.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>407333.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>1268260 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-9581ea60-d34a-4cc9-804b-29709baa47a1')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-9581ea60-d34a-4cc9-804b-29709baa47a1 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-9581ea60-d34a-4cc9-804b-29709baa47a1');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Actors Classes: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                   address  class\n",
              "0        111112TykSw72ztDN2WJger4cynzWYC5w      2\n",
              "1        1111DAYXhoxZx2tsRnzimfozo783x1yC2      3\n",
              "2         1111VHuXEzHaRCgXbVwojtaP7Co3QABb      2\n",
              "3       111218KKkh1JJFRHbwM16AwCiVCc4m7he1      3\n",
              "4        1115LWW3xsD9jT9VRY7viCN9S34RVAAuA      2\n",
              "...                                    ...    ...\n",
              "822937  3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq      3\n",
              "822938  3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf      3\n",
              "822939  3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid      3\n",
              "822940  3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6      3\n",
              "822941  3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW      3\n",
              "\n",
              "[822942 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>111112TykSw72ztDN2WJger4cynzWYC5w</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1111DAYXhoxZx2tsRnzimfozo783x1yC2</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1111VHuXEzHaRCgXbVwojtaP7Co3QABb</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>111218KKkh1JJFRHbwM16AwCiVCc4m7he1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1115LWW3xsD9jT9VRY7viCN9S34RVAAuA</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822937</th>\n",
              "      <td>3R2Uw5MRdSSigp8AjfT7K5es6Hupm4qLSq</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822938</th>\n",
              "      <td>3R2VBFbqHGC4bQ7b4ixN4jZTdv7RMbEYtf</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822939</th>\n",
              "      <td>3R2WFmRwbDeo3rMVVu5J3jjMxAuQYYWAid</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822940</th>\n",
              "      <td>3R2WTZGYLmbJQyoDSBftJsPRvF1mSEtkh6</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>822941</th>\n",
              "      <td>3R2bm6iqbzcVpEeFCSFarS56b56QfjyiSW</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>822942 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-3d0d3bb1-0f37-4b9c-b660-f2f34b12e224');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Address-Address edgelist: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                              input_address  \\\n",
              "0        14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a   \n",
              "1        14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a   \n",
              "2        13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w   \n",
              "3        1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz   \n",
              "4        1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz   \n",
              "...                                     ...   \n",
              "2868959  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh   \n",
              "2868960  3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi   \n",
              "2868961  34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R   \n",
              "2868962  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2   \n",
              "2868963  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2   \n",
              "\n",
              "                             output_address  \n",
              "0        1GASxu5nMntiRKdVtTVRvEbP965G51bhHH  \n",
              "1        14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a  \n",
              "2        1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G  \n",
              "3        19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c  \n",
              "4        1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA  \n",
              "...                                     ...  \n",
              "2868959  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh  \n",
              "2868960  38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa  \n",
              "2868961  3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM  \n",
              "2868962  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2  \n",
              "2868963  15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36  \n",
              "\n",
              "[2868964 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-08f4f543-1ad2-435c-a6df-74e3f0254ecd\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "      <td>1GASxu5nMntiRKdVtTVRvEbP965G51bhHH</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w</td>\n",
              "      <td>1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz</td>\n",
              "      <td>19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz</td>\n",
              "      <td>1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868959</th>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868960</th>\n",
              "      <td>3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi</td>\n",
              "      <td>38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868961</th>\n",
              "      <td>34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R</td>\n",
              "      <td>3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868962</th>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2868963</th>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "      <td>15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>2868964 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-08f4f543-1ad2-435c-a6df-74e3f0254ecd')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-08f4f543-1ad2-435c-a6df-74e3f0254ecd button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-08f4f543-1ad2-435c-a6df-74e3f0254ecd');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Address-Transaction edgelist: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                             input_address       txId\n",
              "0       14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a  230325127\n",
              "1       13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w  230325139\n",
              "2       1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz   86875675\n",
              "3       16zs5SVSyADh5WrLNbZbpRLsBsN5uEzgeK  230325147\n",
              "4       1QJpwtUorBKPGUJkSyrRcBKTAHq4CXrdYh  230325154\n",
              "...                                    ...        ...\n",
              "477112   1HdnGvuc21Y4QfBEHUc3NFRJhGywdSFUb  157659046\n",
              "477113  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh  157659306\n",
              "477114  3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi  157668825\n",
              "477115  34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R  125788182\n",
              "477116  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2  157670868\n",
              "\n",
              "[477117 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-b2263971-8386-4ddb-8b11-40be8645a0ce\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>txId</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "      <td>230325127</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>13Lhad3SAmu2vqYg2dxbNcxH7LE77kJu2w</td>\n",
              "      <td>230325139</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1MAQQZn7EHP6J3erXByCciFiVcgS8ZhWqz</td>\n",
              "      <td>86875675</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>16zs5SVSyADh5WrLNbZbpRLsBsN5uEzgeK</td>\n",
              "      <td>230325147</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>1QJpwtUorBKPGUJkSyrRcBKTAHq4CXrdYh</td>\n",
              "      <td>230325154</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477112</th>\n",
              "      <td>1HdnGvuc21Y4QfBEHUc3NFRJhGywdSFUb</td>\n",
              "      <td>157659046</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477113</th>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "      <td>157659306</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477114</th>\n",
              "      <td>3DzbpEogZ1mn9FgCHcmzYPLDbV9GuxYHpi</td>\n",
              "      <td>157668825</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477115</th>\n",
              "      <td>34yD1sQg6C16aANCtibYXRj5NsX6tt4v5R</td>\n",
              "      <td>125788182</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>477116</th>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "      <td>157670868</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>477117 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-b2263971-8386-4ddb-8b11-40be8645a0ce')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-b2263971-8386-4ddb-8b11-40be8645a0ce button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-b2263971-8386-4ddb-8b11-40be8645a0ce');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Transaction-Address edgelist: \n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "             txId                      output_address\n",
              "0       230325127  1GASxu5nMntiRKdVtTVRvEbP965G51bhHH\n",
              "1       230325127  14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a\n",
              "2       230325139  1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G\n",
              "3        86875675  19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c\n",
              "4        86875675  1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA\n",
              "...           ...                                 ...\n",
              "837119  157659306  3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh\n",
              "837120  157668825  38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa\n",
              "837121  125788182  3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM\n",
              "837122  157670868  1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2\n",
              "837123  157670868  15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36\n",
              "\n",
              "[837124 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-3dacd5a6-2662-44dc-9597-990b7f8098b3\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>txId</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>230325127</td>\n",
              "      <td>1GASxu5nMntiRKdVtTVRvEbP965G51bhHH</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>230325127</td>\n",
              "      <td>14YRXHHof4BY1TVxN5FqYPcEdpmXiYT78a</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>230325139</td>\n",
              "      <td>1GFdrdgtG34GChM8SMpMwcXFc4nYbH1A5G</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>86875675</td>\n",
              "      <td>19q57SeCEzTnWrWVXA43nZzhSiXkYggh7c</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>86875675</td>\n",
              "      <td>1Kk1NVYnCE8ALXDhgMM6HqTt1jDSvi6QBA</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837119</th>\n",
              "      <td>157659306</td>\n",
              "      <td>3MfN5to5K5be2RupWE8rjJHQ6V9L8ypWeh</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837120</th>\n",
              "      <td>157668825</td>\n",
              "      <td>38jMiiZs2C5n5MPkyc5pSA7wwW6H4p6hPa</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837121</th>\n",
              "      <td>125788182</td>\n",
              "      <td>3G9b7hWZccuft1V4eGUcZqTZaxsqx699bM</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837122</th>\n",
              "      <td>157670868</td>\n",
              "      <td>1JERHCgwHG2Z7T3KjNpEwj3fJNX8vSfCX2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>837123</th>\n",
              "      <td>157670868</td>\n",
              "      <td>15T4xJj6XxyPZWGLPR3S72hD9f9YzUQf36</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>837124 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3dacd5a6-2662-44dc-9597-990b7f8098b3')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-3dacd5a6-2662-44dc-9597-990b7f8098b3 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-3dacd5a6-2662-44dc-9597-990b7f8098b3');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 15
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "Data structure for an example actor (address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K):"
      ],
      "metadata": {
        "id": "5Qw43a6xe9rN"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(\"\\nwallets_features.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\\n\")\n",
        "df_wallets_features[df_wallets_features['address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']\n",
        "\n",
        "print(\"\\nwallets_classes.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\\n\")\n",
        "df_wallets_classes[df_wallets_classes['address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']\n",
        "\n",
        "print(\"\\nAddrAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\\n\")\n",
        "df_AddrAddr_edgelist[(df_AddrAddr_edgelist['input_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K') | (df_AddrAddr_edgelist['output_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K')]\n",
        "\n",
        "print(\"\\nAddrTx_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\\n\")\n",
        "df_AddrTx_edgelist[df_AddrTx_edgelist['input_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']\n",
        "\n",
        "print(\"\\nTxAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\\n\")\n",
        "df_TxAddr_edgelist[df_TxAddr_edgelist['output_address']=='39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K']"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "BHp9b7S1e1-F",
        "outputId": "0fd2f605-9078-4941-ef43-e98e6a67d535"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "wallets_features.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                    address  Time step  num_txs_as_sender  \\\n",
              "1149250  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149251  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149252  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149253  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         23              420.0   \n",
              "1149254  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         24              420.0   \n",
              "...                                     ...        ...                ...   \n",
              "1149666  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149667  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149668  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149669  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "1149670  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K         32              420.0   \n",
              "\n",
              "         num_txs_as receiver  first_block_appeared_in  last_block_appeared_in  \\\n",
              "1149250                  1.0                 435559.0                453704.0   \n",
              "1149251                  1.0                 435559.0                453704.0   \n",
              "1149252                  1.0                 435559.0                453704.0   \n",
              "1149253                  1.0                 435559.0                453704.0   \n",
              "1149254                  1.0                 435559.0                453704.0   \n",
              "...                      ...                      ...                     ...   \n",
              "1149666                  1.0                 435559.0                453704.0   \n",
              "1149667                  1.0                 435559.0                453704.0   \n",
              "1149668                  1.0                 435559.0                453704.0   \n",
              "1149669                  1.0                 435559.0                453704.0   \n",
              "1149670                  1.0                 435559.0                453704.0   \n",
              "\n",
              "         lifetime_in_blocks  total_txs  first_sent_block  \\\n",
              "1149250             18145.0      421.0          435559.0   \n",
              "1149251             18145.0      421.0          435559.0   \n",
              "1149252             18145.0      421.0          435559.0   \n",
              "1149253             18145.0      421.0          435559.0   \n",
              "1149254             18145.0      421.0          435559.0   \n",
              "...                     ...        ...               ...   \n",
              "1149666             18145.0      421.0          435559.0   \n",
              "1149667             18145.0      421.0          435559.0   \n",
              "1149668             18145.0      421.0          435559.0   \n",
              "1149669             18145.0      421.0          435559.0   \n",
              "1149670             18145.0      421.0          435559.0   \n",
              "\n",
              "         first_received_block  ...  blocks_btwn_output_txs_min  \\\n",
              "1149250              451682.0  ...                         0.0   \n",
              "1149251              451682.0  ...                         0.0   \n",
              "1149252              451682.0  ...                         0.0   \n",
              "1149253              451682.0  ...                         0.0   \n",
              "1149254              451682.0  ...                         0.0   \n",
              "...                       ...  ...                         ...   \n",
              "1149666              451682.0  ...                         0.0   \n",
              "1149667              451682.0  ...                         0.0   \n",
              "1149668              451682.0  ...                         0.0   \n",
              "1149669              451682.0  ...                         0.0   \n",
              "1149670              451682.0  ...                         0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_max  blocks_btwn_output_txs_mean  \\\n",
              "1149250                         0.0                          0.0   \n",
              "1149251                         0.0                          0.0   \n",
              "1149252                         0.0                          0.0   \n",
              "1149253                         0.0                          0.0   \n",
              "1149254                         0.0                          0.0   \n",
              "...                             ...                          ...   \n",
              "1149666                         0.0                          0.0   \n",
              "1149667                         0.0                          0.0   \n",
              "1149668                         0.0                          0.0   \n",
              "1149669                         0.0                          0.0   \n",
              "1149670                         0.0                          0.0   \n",
              "\n",
              "         blocks_btwn_output_txs_median  num_addr_transacted_multiple  \\\n",
              "1149250                            0.0                          17.0   \n",
              "1149251                            0.0                          17.0   \n",
              "1149252                            0.0                          17.0   \n",
              "1149253                            0.0                          17.0   \n",
              "1149254                            0.0                          17.0   \n",
              "...                                ...                           ...   \n",
              "1149666                            0.0                          17.0   \n",
              "1149667                            0.0                          17.0   \n",
              "1149668                            0.0                          17.0   \n",
              "1149669                            0.0                          17.0   \n",
              "1149670                            0.0                          17.0   \n",
              "\n",
              "         transacted_w_address_total  transacted_w_address_min  \\\n",
              "1149250                       495.0                       1.0   \n",
              "1149251                       495.0                       1.0   \n",
              "1149252                       495.0                       1.0   \n",
              "1149253                       495.0                       1.0   \n",
              "1149254                       495.0                       1.0   \n",
              "...                             ...                       ...   \n",
              "1149666                       495.0                       1.0   \n",
              "1149667                       495.0                       1.0   \n",
              "1149668                       495.0                       1.0   \n",
              "1149669                       495.0                       1.0   \n",
              "1149670                       495.0                       1.0   \n",
              "\n",
              "         transacted_w_address_max  transacted_w_address_mean  \\\n",
              "1149250                       3.0                   1.046512   \n",
              "1149251                       3.0                   1.046512   \n",
              "1149252                       3.0                   1.046512   \n",
              "1149253                       3.0                   1.046512   \n",
              "1149254                       3.0                   1.046512   \n",
              "...                           ...                        ...   \n",
              "1149666                       3.0                   1.046512   \n",
              "1149667                       3.0                   1.046512   \n",
              "1149668                       3.0                   1.046512   \n",
              "1149669                       3.0                   1.046512   \n",
              "1149670                       3.0                   1.046512   \n",
              "\n",
              "         transacted_w_address_median  \n",
              "1149250                          1.0  \n",
              "1149251                          1.0  \n",
              "1149252                          1.0  \n",
              "1149253                          1.0  \n",
              "1149254                          1.0  \n",
              "...                              ...  \n",
              "1149666                          1.0  \n",
              "1149667                          1.0  \n",
              "1149668                          1.0  \n",
              "1149669                          1.0  \n",
              "1149670                          1.0  \n",
              "\n",
              "[421 rows x 57 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-2f201a3b-9a7a-41b3-9830-a75d1c614310\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>Time step</th>\n",
              "      <th>num_txs_as_sender</th>\n",
              "      <th>num_txs_as receiver</th>\n",
              "      <th>first_block_appeared_in</th>\n",
              "      <th>last_block_appeared_in</th>\n",
              "      <th>lifetime_in_blocks</th>\n",
              "      <th>total_txs</th>\n",
              "      <th>first_sent_block</th>\n",
              "      <th>first_received_block</th>\n",
              "      <th>...</th>\n",
              "      <th>blocks_btwn_output_txs_min</th>\n",
              "      <th>blocks_btwn_output_txs_max</th>\n",
              "      <th>blocks_btwn_output_txs_mean</th>\n",
              "      <th>blocks_btwn_output_txs_median</th>\n",
              "      <th>num_addr_transacted_multiple</th>\n",
              "      <th>transacted_w_address_total</th>\n",
              "      <th>transacted_w_address_min</th>\n",
              "      <th>transacted_w_address_max</th>\n",
              "      <th>transacted_w_address_mean</th>\n",
              "      <th>transacted_w_address_median</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1149250</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149251</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149252</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149253</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>23</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149254</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>24</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149666</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149667</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149668</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149669</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1149670</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32</td>\n",
              "      <td>420.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>453704.0</td>\n",
              "      <td>18145.0</td>\n",
              "      <td>421.0</td>\n",
              "      <td>435559.0</td>\n",
              "      <td>451682.0</td>\n",
              "      <td>...</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>0.0</td>\n",
              "      <td>17.0</td>\n",
              "      <td>495.0</td>\n",
              "      <td>1.0</td>\n",
              "      <td>3.0</td>\n",
              "      <td>1.046512</td>\n",
              "      <td>1.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>421 rows × 57 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-2f201a3b-9a7a-41b3-9830-a75d1c614310')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-2f201a3b-9a7a-41b3-9830-a75d1c614310 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-2f201a3b-9a7a-41b3-9830-a75d1c614310');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "wallets_classes.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                   address  class\n",
              "745591  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K      1"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>address</th>\n",
              "      <th>class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>745591</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-c4d5eff0-a0ed-4804-a4b9-3defda4ff7a5');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "AddrAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                              input_address  \\\n",
              "1317522  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317523  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317634  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317635  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1317644  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "...                                     ...   \n",
              "1592119  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592120  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592121  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592122  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "1592123  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   \n",
              "\n",
              "                             output_address  \n",
              "1317522  131fHSzsK1eQJp7bC94JVWZqJ2JcdR5UfS  \n",
              "1317523  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1317634  1FCw4XNAP6xeWMF4o3RaNENguE9qFumgpn  \n",
              "1317635  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1317644  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "...                                     ...  \n",
              "1592119  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1592120  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1592121  32ZkfqSGoxdx5UGo8YQp1tFhSv8R982Usk  \n",
              "1592122  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  \n",
              "1592123  1KVqB5L93xNQ387NkNZc6rkx4p4HaWpZa9  \n",
              "\n",
              "[915 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-b897a655-d488-4453-8490-eeed66b3abc0\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1317522</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>131fHSzsK1eQJp7bC94JVWZqJ2JcdR5UfS</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317523</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317634</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>1FCw4XNAP6xeWMF4o3RaNENguE9qFumgpn</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317635</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1317644</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592119</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592120</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592121</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>32ZkfqSGoxdx5UGo8YQp1tFhSv8R982Usk</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592122</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1592123</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>1KVqB5L93xNQ387NkNZc6rkx4p4HaWpZa9</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>915 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-b897a655-d488-4453-8490-eeed66b3abc0')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-b897a655-d488-4453-8490-eeed66b3abc0 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-b897a655-d488-4453-8490-eeed66b3abc0');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "AddrTx_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                             input_address       txId\n",
              "235194  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  291338524\n",
              "235250  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   88250674\n",
              "235255  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  331553508\n",
              "235256  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  331553509\n",
              "239085  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  289228146\n",
              "...                                    ...        ...\n",
              "298647  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  355110135\n",
              "298648  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  355110139\n",
              "298649  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  343635736\n",
              "298650  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K  355110144\n",
              "298651  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K   69064953\n",
              "\n",
              "[420 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-5ac14163-594a-46f3-895b-92a0f8d50223\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>input_address</th>\n",
              "      <th>txId</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>235194</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>291338524</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>235250</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>88250674</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>235255</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>331553508</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>235256</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>331553509</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>239085</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>289228146</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298647</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>355110135</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298648</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>355110139</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298649</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>343635736</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298650</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>355110144</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>298651</th>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "      <td>69064953</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>420 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-5ac14163-594a-46f3-895b-92a0f8d50223')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-5ac14163-594a-46f3-895b-92a0f8d50223 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-5ac14163-594a-46f3-895b-92a0f8d50223');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "TxAddr_edgelist.csv for address = 39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K0\n",
            "\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "             txId                      output_address\n",
              "431088  291338524  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "431200   88250674  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "431209  331553508  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "431212  331553509  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "436269  289228146  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "...           ...                                 ...\n",
              "539069  355110135  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539071  355110139  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539073  343635736  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539074  355110144  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "539076   69064953  39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K\n",
              "\n",
              "[421 rows x 2 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-3bf84449-5f74-4e0f-b362-27653c819b48\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>txId</th>\n",
              "      <th>output_address</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>431088</th>\n",
              "      <td>291338524</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>431200</th>\n",
              "      <td>88250674</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>431209</th>\n",
              "      <td>331553508</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>431212</th>\n",
              "      <td>331553509</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>436269</th>\n",
              "      <td>289228146</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539069</th>\n",
              "      <td>355110135</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539071</th>\n",
              "      <td>355110139</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539073</th>\n",
              "      <td>343635736</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539074</th>\n",
              "      <td>355110144</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>539076</th>\n",
              "      <td>69064953</td>\n",
              "      <td>39sfuA8pY4UfybgEZi7uvA13jkGzZpsg5K</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>421 rows × 2 columns</p>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3bf84449-5f74-4e0f-b362-27653c819b48')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-3bf84449-5f74-4e0f-b362-27653c819b48 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-3bf84449-5f74-4e0f-b362-27653c819b48');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 6
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "\n",
        "Actors features --- class, 28 transaction-related features, 27 time-related features:\n",
        "\n",
        "![actors_features.png]()\n"
      ],
      "metadata": {
        "id": "moS6bxoLg1Pk"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "df_wallets_features.columns"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "RpljxgT7k49T",
        "outputId": "ee920f81-831e-411b-e840-5aaae0c6e018"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "Index(['address', 'Time step', 'num_txs_as_sender', 'num_txs_as receiver',\n",
              "       'first_block_appeared_in', 'last_block_appeared_in',\n",
              "       'lifetime_in_blocks', 'total_txs', 'first_sent_block',\n",
              "       'first_received_block', 'num_timesteps_appeared_in',\n",
              "       'btc_transacted_total', 'btc_transacted_min', 'btc_transacted_max',\n",
              "       'btc_transacted_mean', 'btc_transacted_median', 'btc_sent_total',\n",
              "       'btc_sent_min', 'btc_sent_max', 'btc_sent_mean', 'btc_sent_median',\n",
              "       'btc_received_total', 'btc_received_min', 'btc_received_max',\n",
              "       'btc_received_mean', 'btc_received_median', 'fees_total', 'fees_min',\n",
              "       'fees_max', 'fees_mean', 'fees_median', 'fees_as_share_total',\n",
              "       'fees_as_share_min', 'fees_as_share_max', 'fees_as_share_mean',\n",
              "       'fees_as_share_median', 'blocks_btwn_txs_total', 'blocks_btwn_txs_min',\n",
              "       'blocks_btwn_txs_max', 'blocks_btwn_txs_mean', 'blocks_btwn_txs_median',\n",
              "       'blocks_btwn_input_txs_total', 'blocks_btwn_input_txs_min',\n",
              "       'blocks_btwn_input_txs_max', 'blocks_btwn_input_txs_mean',\n",
              "       'blocks_btwn_input_txs_median', 'blocks_btwn_output_txs_total',\n",
              "       'blocks_btwn_output_txs_min', 'blocks_btwn_output_txs_max',\n",
              "       'blocks_btwn_output_txs_mean', 'blocks_btwn_output_txs_median',\n",
              "       'num_addr_transacted_multiple', 'transacted_w_address_total',\n",
              "       'transacted_w_address_min', 'transacted_w_address_max',\n",
              "       'transacted_w_address_mean', 'transacted_w_address_median'],\n",
              "      dtype='object')"
            ]
          },
          "metadata": {},
          "execution_count": 8
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "LLgHsC-abwGa"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "bvENGyHKYekc"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Graph Visualization\n",
        "\n",
        "This section shows visualizations of the Actor Interaction graph (addr-addr graph) and Address-Transaction graph (addr-tx graph):"
      ],
      "metadata": {
        "id": "SCxwc34Rlovi"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "### Actor Interaction Graph"
      ],
      "metadata": {
        "id": "B6X4nxQlsPhe"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Graph of all addr-addr in time step 32:"
      ],
      "metadata": {
        "id": "yNqbvTVimm0X"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "all_ids = df_wallets_features_classes_combined[(df_wallets_features_classes_combined['Time step'] == 32)]['address']\n",
        "short_edges = df_AddrAddr_edgelist[df_AddrAddr_edgelist['input_address'].isin(all_ids)]\n",
        "graph = nx.from_pandas_edgelist(short_edges, source = 'input_address', target = 'output_address', \n",
        "                                 create_using = nx.DiGraph())\n",
        "pos = nx.spring_layout(graph, k=0.1)\n",
        "\n",
        "edge_x = []\n",
        "edge_y = []\n",
        "for edge in graph.edges():\n",
        "    x0, y0 = pos[edge[0]]\n",
        "    x1, y1 = pos[edge[1]]\n",
        "    edge_x.append(x0)\n",
        "    edge_x.append(x1)\n",
        "    edge_x.append(None)\n",
        "    edge_y.append(y0)\n",
        "    edge_y.append(y1)\n",
        "    edge_y.append(None)\n",
        "\n",
        "edge_trace = go.Scatter(\n",
        "    x=edge_x, y=edge_y,\n",
        "    line=dict(width=0.1, color='grey'),\n",
        "    hoverinfo='none',\n",
        "    mode='lines')\n",
        "\n",
        "node_x = []\n",
        "node_y = []\n",
        "node_text=[]\n",
        "for node in graph.nodes():\n",
        "    x, y = pos[node]\n",
        "    node_x.append(x)\n",
        "    node_y.append(y)\n",
        "    node_text.append(node)\n",
        "\n",
        "node_trace = go.Scatter(\n",
        "    x=node_x, y=node_y,\n",
        "    mode='markers',\n",
        "    hoverinfo='text',\n",
        "    marker=dict(\n",
        "        color=[],\n",
        "        size=5,\n",
        "        colorbar=dict(\n",
        "            thickness=15,\n",
        "            title='Address Type',\n",
        "            xanchor='left',\n",
        "            titleside='right',\n",
        "            tickmode='array',\n",
        "            tickvals=[3,1,2],\n",
        "            ticktext=['Unknown','Illicit','Licit']\n",
        "        ),\n",
        "        line_width=0.5))\n",
        "node_trace.text=node_text\n",
        "node_trace.marker.color = pd.to_numeric(df_wallets_features_classes_combined[df_wallets_features_classes_combined['address'].isin(list(graph.nodes()))]['class'])\n",
        "\n",
        "fig = go.Figure(data=[edge_trace, node_trace],\n",
        "             layout=go.Layout(\n",
        "                title=\"All Addresses in Time Step 32\",\n",
        "                titlefont_size=16,\n",
        "                showlegend=False,\n",
        "                hovermode='closest',\n",
        "                margin=dict(b=20,l=5,r=5,t=40),\n",
        "                annotations=[ dict(\n",
        "                    showarrow=True,\n",
        "                    xref=\"paper\", yref=\"paper\",\n",
        "                    x=0.005, y=-0.002 ) ],\n",
        "                xaxis=dict(showgrid=False, zeroline=False, showticklabels=False),\n",
        "                yaxis=dict(showgrid=False, zeroline=False, showticklabels=False))\n",
        "                )\n",
        "fig.show()"
      ],
      "metadata": {
        "id": "lV8q37pnJf-x"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Graph of all addr-addr in time step 14:"
      ],
      "metadata": {
        "id": "exDtk1dZADJD"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "all_ids = df_wallets_features_classes_combined[(df_wallets_features_classes_combined['Time step'] == 14)]['address']\n",
        "short_edges = df_AddrAddr_edgelist[df_AddrAddr_edgelist['input_address'].isin(all_ids)]\n",
        "graph = nx.from_pandas_edgelist(short_edges, source = 'input_address', target = 'output_address', \n",
        "                                 create_using = nx.DiGraph())\n",
        "pos = nx.spring_layout(graph, k=0.1)\n",
        "\n",
        "edge_x = []\n",
        "edge_y = []\n",
        "for edge in graph.edges():\n",
        "    x0, y0 = pos[edge[0]]\n",
        "    x1, y1 = pos[edge[1]]\n",
        "    edge_x.append(x0)\n",
        "    edge_x.append(x1)\n",
        "    edge_x.append(None)\n",
        "    edge_y.append(y0)\n",
        "    edge_y.append(y1)\n",
        "    edge_y.append(None)\n",
        "\n",
        "edge_trace = go.Scatter(\n",
        "    x=edge_x, y=edge_y,\n",
        "    line=dict(width=0.1, color='grey'),\n",
        "    hoverinfo='none',\n",
        "    mode='lines')\n",
        "\n",
        "node_x = []\n",
        "node_y = []\n",
        "node_text=[]\n",
        "for node in graph.nodes():\n",
        "    x, y = pos[node]\n",
        "    node_x.append(x)\n",
        "    node_y.append(y)\n",
        "    node_text.append(node)\n",
        "\n",
        "node_trace = go.Scatter(\n",
        "    x=node_x, y=node_y,\n",
        "    mode='markers',\n",
        "    hoverinfo='text',\n",
        "    marker=dict(\n",
        "        color=[],\n",
        "        size=5,\n",
        "        colorbar=dict(\n",
        "            thickness=15,\n",
        "            title='Address Type',\n",
        "            xanchor='left',\n",
        "            titleside='right',\n",
        "            tickmode='array',\n",
        "            tickvals=[3,1,2],\n",
        "            ticktext=['Unknown','Illicit','Licit']\n",
        "        ),\n",
        "        line_width=0.5))\n",
        "node_trace.text=node_text\n",
        "node_trace.marker.color = pd.to_numeric(df_wallets_features_classes_combined[df_wallets_features_classes_combined['address'].isin(list(graph.nodes()))]['class'])\n",
        "\n",
        "fig = go.Figure(data=[edge_trace, node_trace],\n",
        "             layout=go.Layout(\n",
        "                title=\"All Addresses in Time Step 14\",\n",
        "                titlefont_size=16,\n",
        "                showlegend=False,\n",
        "                hovermode='closest',\n",
        "                margin=dict(b=20,l=5,r=5,t=40),\n",
        "                annotations=[ dict(\n",
        "                    showarrow=True,\n",
        "                    xref=\"paper\", yref=\"paper\",\n",
        "                    x=0.005, y=-0.002 ) ],\n",
        "                xaxis=dict(showgrid=False, zeroline=False, showticklabels=False),\n",
        "                yaxis=dict(showgrid=False, zeroline=False, showticklabels=False))\n",
        "                )\n",
        "fig.show()"
      ],
      "metadata": {
        "id": "4k9fkhMRAknk"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "k80tzSnnr0Ld"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# **Acknowledgements**\n",
        "\n",
        "\n",
        "---\n",
        "---\n",
        "\n",
        "\n",
        "Released by: Youssef Elmougy, Ling Liu\n",
        "\n",
        "\n",
        "\n",
        "School of Computer Science, Georgia Institute of Technology\n",
        "\n",
        "Contact: yelmougy3@gatech.edu\n",
        "\n",
        "\n",
        "---\n",
        "\n",
        "Github Repository: [https://www.github.com/git-disl/EllipticPlusPlus](https://www.github.com/git-disl/EllipticPlusPlus)\n",
        "\n",
        "\n",
        "If you use our dataset in your work, please cite our paper:\n",
        "\n",
        "\n",
        "\n",
        "\n",
        "\n",
        ">> Youssef Elmougy and Ling Liu. 2023. Demystifying Fraudulent Transactions and Illicit Nodes in the Bitcoin Network for Financial Forensics.\n",
        "\n",
        "---\n",
        "\n"
      ],
      "metadata": {
        "id": "BwrFHYfy5hrz"
      }
    }
  ]
}